#header{
<title>!!$name!!</title>
<script src="/css_js/layui/layui.js" charset="utf-8"></script>
<link rel="stylesheet" href="/css_js/layui/layui.css" media="all"> }# #body{

<header class="am-header">
	<p class="layui-elem-quote">!!$name!!</</p>

</header>
<div id="main">
	<div class="site-text site-block">
		<form class="layui-form" method="post" target="_blank">

			<div class="layui-form-item">
				<label class="layui-form-label">打赏金额</label>
				<div class="layui-input-block">
					<input type="number" name="WIDtotal_amount" required="" lay-verify="required" placeholder="金额" autocomplete="off" class="layui-input layui-form-danger" value="!!$output['WIDtotal_amount']!!">
				</div>
			</div>

			<div class="layui-form-item layui-form-text">
				<label class="layui-form-label">留言</label>
				<div class="layui-input-block">
					<textarea name="WIDbody" placeholder="!!$output['WIDbody']!!" class="layui-textarea"></textarea>
				</div>
			</div>

			<div class="layui-form-item">
				<div class="layui-input-block">
					<button class="layui-btn" lay-submit="" lay-filter="formDemo">立即打赏</button>
					<button type="reset" class="layui-btn layui-btn-primary">重置</button>
				</div>
			</div>
		</form>

	</div>

</div>

}# #footer{
<script>
	//Demo
	layui.use('form', function() {
		var form = layui.form;
		//
		//				form.on('switch(switchTest)', function(data) {
		//					layer.tips('开关checked：' + (this.checked ? 'true' : 'false'), data.othis)
		//				});

		//监听提交
		form.on('submit(formDemo)', function(data) {
			var coin=data.field.WIDtotal_amount;
			layer.msg('打赏金额为{0}元，前往支付...'.format(coin));
			
			//监听支付状态
		var payState=setInterval(function(){
				Pure_UrlPost('!!SplitUrl("zfb/pay/payState")!!',{},function(x){
//					log(x.status)
					if(x.status){
						clearInterval(payState);
						layer.alert('感谢对本站的支持',{title:'打赏成功'});
					}
				})
			},1000);
//			log(data.field.WIDtotal_amount)
//			layer.msg(JSON.stringify(data.field));
			return true;
		});
	});
	
	
	
	
</script>

}#